/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.webanovare;

import java.util.Random;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author expert
 */
@XmlRootElement(name = "user")
@XmlAccessorType(XmlAccessType.PROPERTY)
public class UserProxy {
    private Long id;
    private String userName;
    private String password;
    
    public UserProxy(Long id, String userName, String password) {
        this.id = id;
        this.userName = userName;
        this.password = password;
    }
    
    public UserProxy(String userName, String password) {
        this.id = new Long(new Random().nextInt(100));
        this.userName = userName;
        this.password = password;
    }
    
    public UserProxy() {}
    
    @XmlElement(name="id")
    public Long getId() {
        return this.id;
    }
    
    @XmlElement(name="userName")
    public String getUserName() {
        return this.userName;
    }
    
    @XmlElement(name="password")
    public String getPassword() {
        return this.password;
    } 
}
